<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('expenses/index')}">支出列表</a></li>
			<li><a href="{:url('expenses/add')}">添加支出</a></li>
		</ul>
        <form class="well form-inline margin-top-20" method="get" action="{:url('expenses/index')}">
            合同编号:
            <input type="text" class="form-control" name="contract_no" style="width: 150px;" value="{:input('request.contract_no/s','')}">
            支出日期:
            <input type="text" class="form-control js-bootstrap-date" name="date" style="width: 150px;" value="{:input('request.date/s','')}" autocomplete="off">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('expenses/index')}">清空</a>
        </form>
        <br>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>相关合同</th>
					<th>支出费用</th>
					<th>支出日期</th>
					<th width="140">{:lang('ACTIONS')}</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="list" item="vo">
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo.contract.customer.name} | {$vo.contract.contract_no}</td>
						<td>{$vo.date}</td>
						<td>{$vo.amount}</td>
						<td>
							<a class="btn btn-xs btn-primary" href='{:url("expenses/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
							<a class="btn btn-xs btn-danger js-ajax-delete" href='{:url("expenses/delete",array("id"=>$vo["id"]))}'>{:lang('DELETE')}</a>
						</td>
					</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>